num = 100

def test1():
    print(num)

def test2():
    num = 500
    print(num)

test1()
test2()
print(num)
print("\n")



num = 100

def test1():
    print(num)

def test2():
    global num
    num = 500
    print(num)

test1()
test2()
print(num)
